<template>
    <div class="audit-stopAndPause-view">

      <el-form size="small" label-width="110px">

        <el-form-item :label="datas.stop_type == 1 ? '暂停原因' : '终止原因'">
          <span>{{datas.reason_string}}</span>
        </el-form-item>

        <el-form-item label="备注">
          <span>{{datas.description}}</span>
        </el-form-item>

        <el-form-item label="附件：">
          <file-preview :file-list="datas.files ? datas.files : []" />
        </el-form-item>
      </el-form>

      <el-form :inline="true" ref="elForm" :model="projectData" size="small" label-width="110px">
        <el-row>
          <el-col :span="8">
            <el-form-item label="立项信息：">
              <div>{{projectData.demand_info_name ? projectData.demand_info_name : "无"}}</div>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="项目来源：">
              <div>{{projectData.project_source_name ? projectData.project_source_name : "无"}}</div>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="项目编号：">
              <div>{{projectData.project_no ? projectData.project_no : "无"}}</div>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="项目名称：">
              <div>{{projectData.project_name ? projectData.project_name : "无"}}</div>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="项目所属阶段：">
              <div>{{projectData.project_phases_name ? projectData.project_phases_name : "无"}}</div>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="项目级别：">
              <div>{{projectData.project_level_name ? projectData.project_level_name : "无"}}</div>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="项目类型：">
              <div>{{projectData.project_category_name ? projectData.project_category_name : "无"}}</div>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="申报类别：">
              <div>{{projectData.sign_category_name ? projectData.sign_category_name : "无"}}</div>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="药物成分：">
              <div>{{projectData.drug_ingredient ? projectData.drug_ingredient : "无"}}</div>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="药物类别：">
              <div>{{projectData.drug_category ? projectData.drug_category : "无"}}</div>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="功能主治：">
              <div>{{projectData.function_attend ? projectData.function_attend : "无"}}</div>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="剂型与规格：">
              <div>{{projectData.drug_or_specifications ? projectData.drug_or_specifications : "无"}}</div>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="项目负责人：">
              <div>{{projectData.project_person_in_charge ? projectData.project_person_in_charge : "无"}}</div>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="委托单位：">
              <div>{{projectData.entrusting_party ? projectData.entrusting_party : "无"}}</div>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="工期（天）：">
              <div>{{projectData.duration}}</div>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="计划开始时间：">
              <div>{{projectData.plan_start_time ? dateFormat1('yyyy-mm-dd',projectData.plan_start_time) : "无"}}</div>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="计划结束时间：">
              <div>{{projectData.plan_start_time ? dateFormat1('yyyy-mm-dd',projectData.plan_end_time) : "无"}}</div>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="实际开始时间：">
              <div>{{projectData.reality_start_time ? dateFormat1('yyyy-mm-dd',projectData.reality_start_time) : "无"}}</div>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="实际结束时间：">
              <div>{{projectData.reality_end_time ? dateFormat1('yyyy-mm-dd',projectData.reality_end_time) : "无"}}</div>
            </el-form-item>
          </el-col>


        </el-row>

      </el-form>

    </div>
</template>

<script>
    export default {
        name: "stopOrPauseView",
        props:{
            datas:{
                type:Object,
                default:function () {
                    return{}
                }
            }
        },
        watch:{
            datas:{
                handler:function (newVal,oldVal) {
                    this.getProjectData()
                },
                immediate:true
            }
        },
        data:function(){
            return{
                projectData:{}
            }
        },
        methods:{
            getProjectData:function () {
                if (this.datas.project_id){
                    this.$api.PROJECT_MANAGER_PROJECT_DETAIL(this.datas.project_id).then(res=>{
                        if (res.code == 200){
                            this.projectData = res.data;

                        }
                    }).catch(err=>{

                    })
                }

            }
        }
    }
</script>

<style scoped>



</style>
